package com.usian.config;

import ch.qos.logback.classic.pattern.DateConverter;
import com.usian.interceptor.LoginInterceptor;
import org.springframework.format.FormatterRegistry;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Component
public class  MyConfig implements WebMvcConfigurer {
    //<mvc:interceptors>
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/user/**");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/cl/**");
    }

}
